<template>
  <div class="app-container">
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="待办任务" name="first">
        <softwareTodo v-if="activeName == 'first'"></softwareTodo>
      </el-tab-pane >
      <el-tab-pane label="已办任务" name="second">
        <softwareFinished v-if="activeName == 'second'"></softwareFinished>
      </el-tab-pane>
      <el-tab-pane  v-if="checkPermi(['workflow:software:manage'])" label="软件开发需求处理申请管理" name="third">
        <softwareGather v-if="activeName == 'third'"></softwareGather>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import softwareFinished from './components/softwareFinished.vue';
import softwareGather from './components/softwareGather.vue'
import softwareTodo from './components/softwareTodo.vue'

export default {
    name:'Software',
    components: {
      softwareFinished,
      softwareGather,
      softwareTodo
    },
  data() {
    return {
      activeName: 'first'
    };
    },
    mounted() {
        // 获取按钮元素数组中第一个.click()
  },
  methods: {
    
    handleClick(tab, event) {
      console.log(tab.name,"tab.name");
      this.activeName = tab.name
      }
  }
};
</script>

<style lang="scss" scoped>
</style>
